/******************************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Ltd.                       */
/*                                                                            */
/*  NAME      = fix_request.c                                                 */
/*  NOTE      = FXI 请求解析                                                  */
/*  DATE      = 2015/03/19 by zhengxd                                         */
/******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

#include "fix_core.h"
#include "fix_comm.h"
#include "fix_fast.h"

#define APM_REPORT_KEY_PUB_ID                APM_REPORT_KEY_PUB".fix.id"
#define APM_REPORT_KEY_PUB_START_TIMESTAMP   APM_REPORT_KEY_PUB".fix.start_time"
#define APM_REPORT_KEY_PUB_END_TIMESTAMP     APM_REPORT_KEY_PUB".fix.end_time"
#define APM_REPORT_KEY_PUB_DATA_BYTES        APM_REPORT_KEY_PUB".fix.data_bytes"
#define APM_REPORT_KEY_PUB_SEND_TIME_US      APM_REPORT_KEY_PUB".fix.send_time_us"

/*******************************************************************************
*  FUNC     :  上报广播信息
*  ARGS     :  p_st_conn(入力链接信息)
*           :  p_st_private(私有session数据)
*           :  p_st_hash_report(保存Frreport_data)
*  RTN      :  APM_L7_ANALYZE_FAIL      (FAIL)
*              APM_L7_ANALYZE_SUCC      (SUCC)
*  NOTE     :
*******************************************************************************/
static int __fix_report_bro(Conntrack *p_st_conn
                            , L7session_fix_private *p_st_private
                            , Frhash_header *p_st_hash_report
                            , Frlist_header *p_lst_param)
{
    int i_ret = FR_SUCC;
    /* .fix.数字 */
    unsigned int ui_key_len = strlen(APM_REPORT_KEY_PUB) + 1 + 3 + 1 + 11 + 1;
    unsigned int ui_name_key_len = 0;
    unsigned long ul_send_time_us = 0;
    char *p_key = NULL;
    Frreport_data *p_st_report_data = NULL;
    Frreport_body_data *p_st_sess_body = NULL;
    L7session_fix *p_st_sess = p_st_private->p_st_sess;
    L7_fragment_fix *p_st_fragment = p_st_private->p_st_fragment;
    unsigned long ul_req_sequence = frct_seq_increase(p_st_conn);
    Frlist_node *p_st_node = NULL;
    Fix_param *p_st_param = NULL;

    /* 创建report body */
    p_st_sess_body = frreport_body_new_l7(p_st_conn);
    if (p_st_sess_body == NULL)
    {
        return APM_L7_ANALYZE_FAIL;
    }
    /* 追加connection相关信息 */
    i_ret = frreport_body_l7_add_connInfo(p_st_sess_body, p_st_conn);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }

    /* add server */
    if (p_st_sess->p_user_name)
    {
        i_ret = frreport_body_l7_add_str(p_st_sess_body
                                         , APM_REPORT_KEY_SESSION_USERNAME
                                         , p_st_sess->p_user_name);
        if (i_ret != FR_SUCC)
        {
            frreport_body_free(&p_st_sess_body);
            return APM_L7_ANALYZE_FAIL;
        }
    }
    if (p_st_sess->st_login.tv_sec != 0
        || p_st_sess->st_login.tv_usec != 0)
    {
        /* add request start time */
        i_ret = frreport_body_l7_add_timeval(p_st_sess_body
                                            , APM_REPORT_KEY_SESSION_LOGIN_TIMESTAMP
                                            , &p_st_sess->st_login);
        if (i_ret != FR_SUCC)
        {
            frreport_body_free(&p_st_sess_body);
            return APM_L7_ANALYZE_FAIL;
        }
    }

    i_ret = frreport_body_l7_add_str(p_st_sess_body
                                    , APM_REPORT_KEY_TRANS_TITLE
                                    , p_st_fragment->p_msg_type ? p_st_fragment->p_msg_type : "");
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }

    /* add sequence id */
    i_ret = frreport_body_l7_add_ulong(p_st_sess_body
                                      , APM_REPORT_KEY_PUB_ID
                                      , ul_req_sequence);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }

    /* add request start time */
    i_ret = frreport_body_l7_add_timeval(p_st_sess_body
                                        , APM_REPORT_KEY_PUB_START_TIMESTAMP
                                        , &p_st_fragment->st_start_timestamp);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }
    /* add request end time */
    i_ret = frreport_body_l7_add_timeval(p_st_sess_body
                                        , APM_REPORT_KEY_PUB_END_TIMESTAMP
                                        , &p_st_fragment->st_end_timestamp);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }
    /* add message type */
    i_ret = frreport_body_l7_add_str(p_st_sess_body, FIX_REPORT_KEY_PUB_MSG_TYPE
                                    , p_st_fragment->p_msg_type ? p_st_fragment->p_msg_type : "");
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }
    /* add send time */
    ul_send_time_us = fix_get_interval_time(&p_st_fragment->st_start_timestamp
                                           , &p_st_fragment->st_end_timestamp);
    i_ret = frreport_body_l7_add_ulong(p_st_sess_body
                                      , APM_REPORT_KEY_PUB_SEND_TIME_US
                                      , ul_send_time_us);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }
    /* add send data bytes */
    i_ret = frreport_body_l7_add_ulong(p_st_sess_body
                                      , APM_REPORT_KEY_PUB_DATA_BYTES
                                      , p_st_fragment->ui_hd_len + p_st_fragment->ui_bd_len + FIX_SHO_LEN);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }

    p_st_node = FRLIST_FIRST_NODE(p_lst_param);
    while (p_st_node)
    {
        p_st_param = (Fix_param *)FRLIST_GET_NODE_DATA(p_st_node);
        /* 做成key */
        if (p_st_param->p_tag_name)
        {
            ui_name_key_len = strlen(APM_REPORT_KEY_PUB) + 1 + 3 + 1 + strlen(p_st_param->p_tag_name) + 1;
            p_key = (char *)frmalloc(ui_name_key_len);
            if (p_key == NULL)
            {
                frreport_body_free(&p_st_sess_body);
                return APM_L7_ANALYZE_FAIL;
            }
            snprintf(p_key, ui_name_key_len, "%s.fix.%s", APM_REPORT_KEY_PUB, p_st_param->p_tag_name);
            i_ret = frreport_body_l7_add_str(p_st_sess_body, p_key
                           , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
            frfree(p_key);
            if (i_ret != FR_SUCC)
            {
                frreport_body_free(&p_st_sess_body);
                return APM_L7_ANALYZE_FAIL;
            }
            p_st_node = FRLIST_NEXT_NODE(p_st_node);
            continue;
        }

        switch (p_st_param->ui_tag)
        {
            case FIX_TAG_ACCOUNT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ACCOUNT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_AVGPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_AVGPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BEGINSEQNO:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BEGINSEQNO
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BEGINSTRING:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BEGINSTRING
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BODYLENGTH:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BODYLENGTH
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CHECKSUM:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CHECKSUM
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CLORDID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CLORDID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CUMQTY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CUMQTY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CURRENCY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CURRENCY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ENDSEQNO:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ENDSEQNO
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EXECID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EXECID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EXECINST:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EXECINST
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EXECREFID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EXECREFID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_HANDINST:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_HANDINST
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYIDSOURCE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYIDSOURCE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LASTPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LASTPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LASTQTY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LASTQTY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MSGSEQNUM:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MSGSEQNUM
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MSGTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MSGTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NEWSEQNO:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NEWSEQNO
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDERID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDERID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDERQTY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDERQTY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDSTATUS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDSTATUS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORIGCLORDID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORIGCLORDID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_POSSDUPFLAG:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_POSSDUPFLAG
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRICE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRICE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_REFSEQNUM:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_REFSEQNUM
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SENDERCOMPID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SENDERCOMPID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SENDERSUBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SENDERSUBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SENDINGTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SENDINGTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SIDE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SIDE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SYMBOL:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SYMBOL
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TARGETCOMPID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TARGETCOMPID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TARGETSUBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TARGETSUBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TEXT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TEXT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TIMEINFORCE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TIMEINFORCE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRANSACTTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRANSACTTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LISTID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LISTID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LISTSEQNO:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LISTSEQNO
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TOTNOORDERS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TOTNOORDERS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOORDERS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOORDERS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_POSITIONEFFECT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_POSITIONEFFECT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SIGNATURE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SIGNATURE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECUREDATALEN:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECUREDATALEN
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECUREDATA:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECUREDATA
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SIGNATURELENGTH:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SIGNATURELENGTH
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_RAWDATALENGTH:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_RAWDATALENGTH
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_RAWDATA:
                i_ret = frreport_body_l7_add_bin(p_st_sess_body
                                                , FIX_REPORT_KEY_REQ_RAWDATA
                                                , p_st_param->field_value.p_st_value->p_data
                                                , p_st_param->field_value.p_st_value->ui_len);
                break;

            case FIX_TAG_POSSRESEND:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_POSSRESEND
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ENCRYPTMETHOD:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ENCRYPTMETHOD
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_STOPPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_STOPPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CXLREJREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CXLREJREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDREJREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDREJREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYDESC:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYDESC
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_HEARTBTINT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_HEARTBTINT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MINQTY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MINQTY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MAXFLOOR:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MAXFLOOR
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TESTREQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TESTREQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ONBEHALFOFCOMPID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ONBEHALFOFCOMPID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ONBEHALFOFSUBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ONBEHALFOFSUBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_QUOTEID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_QUOTEID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORIGSENDINGTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORIGSENDINGTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_GAPFILLFLAG:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_GAPFILLFLAG
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EXPIRETIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EXPIRETIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DKREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DKREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DELIVERTOCOMPID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DELIVERTOCOMPID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DELIVERTOSUBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DELIVERTOSUBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BIDPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BIDPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_OFFERPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_OFFERPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BIDSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BIDSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_OFFERSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_OFFERSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOMISCFEES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOMISCFEES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MISCFEEAMT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MISCFEEAMT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MISCFEETYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MISCFEETYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRECLOSEPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRECLOSEPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_RESETSEQNUMFLAG:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_RESETSEQNUMFLAG
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SENDERLOCATIONID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SENDERLOCATIONID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TARGETLOCATIONID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TARGETLOCATIONID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ONBEHALFOFLOCATIONID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ONBEHALFOFLOCATIONID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DELIVERTOLOCATIONID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DELIVERTOLOCATIONID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NORELATEDSYM:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NORELATEDSYM
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_HEADLINE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_HEADLINE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EXECTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EXECTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LEAVESQTY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LEAVESQTY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CASHORDERQTY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CASHORDERQTY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ACCRUEDINTERESTAMT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ACCRUEDINTERESTAMT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EFFECTIVETIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EFFECTIVETIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYEXCHANGE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYEXCHANGE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MAXSHOW:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MAXSHOW
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PEGOFFSETVALUE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PEGOFFSETVALUE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ISSUEDATE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ISSUEDATE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CONTRACTMULTIPLIER:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CONTRACTMULTIPLIER
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SUBSCRIPTIONREQUESTTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SUBSCRIPTIONREQUESTTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOMDENTRIES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOMDENTRIES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDENTRYTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDENTRYTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDENTRYPX:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDENTRYPX
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDENTRYSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDENTRYSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDENTRYDATE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDENTRYDATE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDENTRYTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDENTRYTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDMKT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDMKT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MDENTRYPOSITIONNO:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MDENTRYPOSITIONNO
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CORPORATEACTION:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CORPORATEACTION
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DEFOFFERSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DEFOFFERSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOQUOTEENTRIES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOQUOTEENTRIES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOQUOTESETS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOQUOTESETS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_QUOTEACKSTATUS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_QUOTEACKSTATUS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_QUOTECANCELTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_QUOTECANCELTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_QUOTEENTRYID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_QUOTEENTRYID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_QUOTEREJECTREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_QUOTEREJECTREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_UNDERLYINGIDSOURCE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_UNDERLYINGIDSOURCE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_UNDERLYINGSECURITYEXCHANGE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_UNDERLYINGSECURITYEXCHANGE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_UNDERLYINGSECURITYID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_UNDERLYINGSECURITYID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_UNDERLYINGSYMBOL:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_UNDERLYINGSYMBOL
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_UNDERLYINGCURRENCY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_UNDERLYINGCURRENCY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYREQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYREQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYRESPONSEID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYRESPONSEID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYSTATUSREQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYSTATUSREQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_UNSOLICITEDINDICATOR:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_UNSOLICITEDINDICATOR
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYTRADINGSTAT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYTRADINGSTAT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESREQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESREQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADINGSESSIONID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADINGSESSIONID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESMETHOD:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESMETHOD
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESMODE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESMODE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESSTATUS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESSTATUS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESSTARTTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESSTARTTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESOPENTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESOPENTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESPRECLOSETIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESPRECLOSETIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESCLOSETIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESCLOSETIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESENDTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESENDTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NUMBEROFORDERS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NUMBEROFORDERS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MESSAGEENCODING:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MESSAGEENCODING
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ENCODEDTEXTLEN:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ENCODEDTEXTLEN
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ENCODEDTEXT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ENCODEDTEXT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LASTMSGSEQNUMPROCESSED:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LASTMSGSEQNUMPROCESSED
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ONBEHALFOFSENDINGTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ONBEHALFOFSENDINGTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_REFTAGID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_REFTAGID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_REFMSGTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_REFMSGTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SESSIONREJECTREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SESSIONREJECTREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_EXECRESTATEMENTREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_EXECRESTATEMENTREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_GROSSTRADEAMT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_GROSSTRADEAMT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MAXMESSAGESIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MAXMESSAGESIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOMSGTYPES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOMSGTYPES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MSGDIRECTION:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MSGDIRECTION
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOTRADINGSESSIONSS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOTRADINGSESSIONSS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TOTALVOLUMETRADED:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TOTALVOLUMETRADED
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DISCRETIONOFFSETVALUE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DISCRETIONOFFSETVALUE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TOTALNUMSECURITIES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TOTALNUMSECURITIES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BIDTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BIDTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOTRADINGSESSIONS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOTRADINGSESSIONS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRICETYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRICETYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CXLREJRESPONSETO:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CXLREJRESPONSETO
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PARTYIDSOURCE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PARTYIDSOURCE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PARTYID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PARTYID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PARTYROLE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PARTYROLE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOPARTYIDS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOPARTYIDS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOSECURITYALTID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOSECURITYALTID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYALTID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYALTID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYALTIDSOURCE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYALTIDSOURCE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRODUCT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRODUCT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CFICODE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CFICODE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TESTMESSAGEINDICATOR:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TESTMESSAGEINDICATOR
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDERPERCENT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDERPERCENT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PARTYSUBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PARTYSUBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDERCAPACITY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDERCAPACITY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MASSCANCELREQUESTTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MASSCANCELREQUESTTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MASSCANCELRESPONSE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MASSCANCELRESPONSE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MASSCANCELREJECTREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MASSCANCELREJECTREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MATURITYDATE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MATURITYDATE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_USERNAME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_USERNAME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PASSWORD:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PASSWORD
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYREQUESTRESULT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYREQUESTRESULT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ROUNDLOT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ROUNDLOT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MINTRADEVOL:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MINTRADEVOL
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADSESSTATUSREJREASON:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADSESSTATUSREJREASON
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MASSSTATUSREQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MASSSTATUSREQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MASSSTATUSREQTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MASSSTATUSREQTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADINGSESSIONSUBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADINGSESSIONSUBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOHOPS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOHOPS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_HOPCOMPID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_HOPCOMPID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_HOPSENDINGTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_HOPSENDINGTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_HOPREFID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_HOPREFID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRICE2:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRICE2
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYSUBTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYSUBTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NEXTEXPECTEDMSGSEQNUM:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NEXTEXPECTEDMSGSEQNUM
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDSTATUSREQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDSTATUSREQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOPARTYSUBIDS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOPARTYSUBIDS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PARTYSUBIDTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PARTYSUBIDTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PEGMOVETYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PEGMOVETYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PEGOFFSETTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PEGOFFSETTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PEGGEDPRICE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PEGGEDPRICE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PEGSCOPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PEGSCOPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DISCRETIONMOVETYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DISCRETIONMOVETYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DISCRETIONPRICE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DISCRETIONPRICE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LASTLIQUIDITYIND:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LASTLIQUIDITYIND
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_MISCFEEBASIS:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_MISCFEEBASIS
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_STARTDATE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_STARTDATE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ENDDATE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ENDDATE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ORDERENTRYTIME:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ORDERENTRYTIME
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ACCOUNTSECPOSITION:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ACCOUNTSECPOSITION
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DESIGNATIONINSTRUCTION:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DESIGNATIONINSTRUCTION
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NUMTRADES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NUMTRADES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TOTALVALUETRADED:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TOTALVALUETRADED
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LASTPRICECHANGE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LASTPRICECHANGE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TOTALLONGPOSITION:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TOTALLONGPOSITION
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_INDUSTRYCLASSIFICATION:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_INDUSTRYCLASSIFICATION
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SHAREFACEVALUE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SHAREFACEVALUE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_OUTSTANDINGSHARES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_OUTSTANDINGSHARES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PUBLICFLOATSHAREQUANTITY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PUBLICFLOATSHAREQUANTITY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PREVIOUSYEARPROFITPERSHARE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PREVIOUSYEARPROFITPERSHARE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CURRENTYEARPROFITPERSHARE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CURRENTYEARPROFITPERSHARE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_BIDLOTSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_BIDLOTSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ASKLOTSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ASKLOTSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRICETICKSIZE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRICETICKSIZE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PRICELIMITTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PRICELIMITTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_AUCTIONPRICELIMIT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_AUCTIONPRICELIMIT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_CONTINUOUSTRADEPRICELIMIT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_CONTINUOUSTRADEPRICELIMIT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DAILYPRICEUPLIMIT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DAILYPRICEUPLIMIT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DAILYPRICEDOWNLI:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DAILYPRICEDOWNLI
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_SECURITYPROPERTIES:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_SECURITYPROPERTIES
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NOINDICESPARTICIPATED:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NOINDICESPARTICIPATED
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_INDEXINCLUSIONINDICATOR:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_INDEXINCLUSIONINDICATOR
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PERATIO1:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PERATIO1
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PERATIO2:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PERATIO2
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NONTRADINGORDTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NONTRADINGORDTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DESIGNATIONTRANSTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DESIGNATIONTRANSTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_PARTICIPATINGINDEXID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_PARTICIPATINGINDEXID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_VOTINGPROPOSAL:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_VOTINGPROPOSAL
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_VOTINGSUBPROPOSAL:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_VOTINGSUBPROPOSAL
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_VOTINGPREFERENCE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_VOTINGPREFERENCE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DIVIDENDSELECT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DIVIDENDSELECT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_DESTSECURITY:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_DESTSECURITY
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_WARRANTSTYLE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_WARRANTSTYLE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_WARRANTPUTORCALL:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_WARRANTPUTORCALL
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_WARRANTCLEARINGTYPE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_WARRANTCLEARINGTYPE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_NAV:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_NAV
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TRADINGPHASECODE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TRADINGPHASECODE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_VALIDATIONCODE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_VALIDATIONCODE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_REQID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_REQID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TESTINST:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TESTINST
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_LISLIMIT:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_LISLIMIT
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TBBOBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TBBOBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TBBOASK:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TBBOASK
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ABBOBID:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ABBOBID
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ABBOASK:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ABBOASK
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_TYPEOFTRADE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_TYPEOFTRADE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            case FIX_TAG_ISPASSIVE:
                i_ret = frreport_body_l7_add_str(p_st_sess_body
                               , FIX_REPORT_KEY_PUB_ISPASSIVE
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                break;

            /* 扩展,直接上报tag */
            default:
                p_key = (char *)frmalloc(ui_key_len);
                if (p_key == NULL)
                {
                    frreport_body_free(&p_st_sess_body);
                    return APM_L7_ANALYZE_FAIL;
                }
                snprintf(p_key, ui_key_len, "%s.fix.%u", APM_REPORT_KEY_PUB, p_st_param->ui_tag);
                i_ret = frreport_body_l7_add_str(p_st_sess_body, p_key
                               , p_st_param->field_value.p_value ? p_st_param->field_value.p_value: "");
                frfree(p_key);
                break;
        }

        if (i_ret != FR_SUCC)
        {
            frreport_body_free(&p_st_sess_body);
            return APM_L7_ANALYZE_FAIL;
        }
        p_st_node = FRLIST_NEXT_NODE(p_st_node);
    }

    /* 创建report data header */
    p_st_report_data = frreport_data_l7_new(FRREPORT_TYPE_L7DATA_PUB);
    if (p_st_report_data == NULL)
    {
        frreport_body_free(&p_st_sess_body);
        return APM_L7_ANALYZE_FAIL;
    }
    /* add body into header */
    i_ret = frreport_data_add_body(p_st_report_data, p_st_sess_body);
    if (i_ret != FR_SUCC)
    {
        frreport_body_free(&p_st_sess_body);
        frreport_data_free(&p_st_report_data);
        return APM_L7_ANALYZE_FAIL;
    }

    /* 上报request数据 */
    i_ret = frreport_data_hash(p_st_hash_report, p_st_report_data);
    if (i_ret != FR_SUCC)
    {
        frreport_data_free(&p_st_report_data);
        return APM_L7_ANALYZE_FAIL;
    }

    return APM_L7_ANALYZE_SET_RESP(APM_L7_ANALYZE_SUCC);
}

/*******************************************************************************
*  FUNC     :  解析广播消息
*  ARGS     :  p_st_conn(入力链接信息)
*           :  p_st_private(私有session数据)
*           :  p_st_hash_report(保存Frreport_data)
*  RTN      :  APM_L7_ANALYZE_FAIL      (FAIL)
*              APM_L7_ANALYZE_TODO      (More data)
*              APM_L7_ANALYZE_SUCC      (SUCC)
*  NOTE     :
*******************************************************************************/
int fix_parse_broadcast(Conntrack *p_st_conn
                        , L7session_fix_private *p_st_private
                        , Frhash_header *p_st_hash_report)
{
    int i_ret = APM_L7_ANALYZE_SUCC;
    int i_sub_ret = APM_L7_ANALYZE_SUCC;
    unsigned int ui_tag = 0;
    unsigned int ui_loop = 0;
    unsigned int ui_first = 0;
    unsigned int ui_loop_loop = 1;
    unsigned int ui_secure_data_len = 0;
    unsigned int ui_raw_data_length = 0;
    unsigned int ui_signa_ture_length = 0;
    unsigned int ui_encoded_text_length = 0;
    L7_fragment_fix *p_st_fragment = p_st_private->p_st_fragment;
    unsigned int ui_hd_len = p_st_fragment->ui_hd_len;
    unsigned int ui_bd_len = p_st_fragment->ui_bd_len;
    unsigned int ui_fix_len = ui_hd_len + ui_bd_len + FIX_SHO_LEN;
    char *p_inbuff = p_st_fragment->p_input_msg + ui_hd_len;
    L7session_fix *p_st_sess = p_st_private->p_st_sess;
    Frlist_header st_param;
    memset(&st_param, 0x0, sizeof(Frlist_header));
    unsigned int arr_deep[FIX_MAX_DEEP] = {0};
    char *p_value = NULL;
    char *p_pamp = NULL;
    unsigned int ui_pmap_size = 0;
    char *p_input_msg = NULL;

    while (ui_bd_len)
    {
        i_ret = fix_get_tag(&p_inbuff, &ui_bd_len, &ui_tag);
        if (i_ret != FR_SUCC)
        {
            frlist_remove_all(&st_param, fix_param_node_free);
            return APM_L7_ANALYZE_FAIL;
        }

        switch (ui_tag)
        {
            /* 以下为message header，选择性上报 */
            case FIX_TAG_TARGETCOMPID:          // 接收方代码(不可加密，接收方标识符)
            case FIX_TAG_ONBEHALFOFCOMPID:      // 最初发送方标识符（可加密），用于经第三方发送
            case FIX_TAG_DELIVERTOCOMPID:       // 最终接收方标识符（可加密），用于经第三方发送
                i_ret = fix_get_value(&p_inbuff, &ui_bd_len, &p_value);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                /* 创建param节点 */
                i_ret = fix_create_node(ui_tag, &p_value, 0, &st_param);
                break;

            case FIX_TAG_SECUREDATALEN:         // 密文数据长度
                i_ret = fix_get_value(&p_inbuff, &ui_bd_len, &p_value);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                i_ret = fix_atoui(p_value, &ui_secure_data_len);
                fix_free((char **)&p_value);
                break;

            case FIX_TAG_SECUREDATA:            // 密文数据（紧跟密文数据长度域）
                i_ret = fix_skip_value2(&p_inbuff, &ui_bd_len, ui_secure_data_len);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                break;

            case FIX_TAG_MSGSEQNUM:             // 消息序号（可加密）
            case FIX_TAG_SENDERSUBID:           // 发送方子标识符（可加密）
            case FIX_TAG_SENDERLOCATIONID:      // 发送方方位标识符（可加密）
            case FIX_TAG_TARGETSUBID:           // 接收方子标识符（可加密）
            case FIX_TAG_TARGETLOCATIONID:      // 接收方方位标识符（可加密）
            case FIX_TAG_ONBEHALFOFSUBID:       // 最初发送方子标识符（可加密）
            case FIX_TAG_ONBEHALFOFLOCATIONID:  // 最初发送方方位标识符（可加密）
            case FIX_TAG_DELIVERTOSUBID:        // 最终接收方子标识符（可加密）
            case FIX_TAG_DELIVERTOLOCATIONID:   // 最终接收方方位标识符（可加密）
            case FIX_TAG_POSSDUPFLAG:           // 可能重复标志，重复发送时，作此标记（可加密）
            case FIX_TAG_POSSRESEND:            // 可能重发标志（可加密）
            case FIX_TAG_SENDINGTIME:           // 发送时间（可加密）
            case FIX_TAG_ORIGSENDINGTIME:       // 原始发送时间（可加密）
            case FIX_TAG_MESSAGEENCODING:       // 消息中Encoded域的字符编码类型（非ASCII 码）
            case FIX_TAG_LASTMSGSEQNUMPROCESSED:// 最后处理消息序号（可加密）
            case FIX_TAG_ONBEHALFOFSENDINGTIME: // 最初发送时间（用UTC 表示时间）
            case FIX_TAG_NOHOPS:                //历史跳跃信息重复组(以下三个的重复次数)
            case FIX_TAG_HOPCOMPID:             // 取值第三方的SenderCompID
            case FIX_TAG_HOPSENDINGTIME:        // 取值用第三方的SendingTime
            case FIX_TAG_HOPREFID:              // 取值第三方的MsgSeqNum
                i_ret = fix_skip_value(&p_inbuff, &ui_bd_len);
                break;

            /* 以下为message tail，不上报 */
            case FIX_TAG_SIGNATURELENGTH:       // 数字签名长度（不可加密）
                i_ret = fix_get_value(&p_inbuff, &ui_bd_len, &p_value);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                i_ret = fix_atoui(p_value, &ui_signa_ture_length);
                fix_free((char **)&p_value);
                break;

            case FIX_TAG_SIGNATURE:             // 数字签名（不可加密）
                i_ret = fix_skip_value2(&p_inbuff, &ui_bd_len, ui_signa_ture_length);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                break;

            case FIX_TAG_RAWDATALENGTH:        // 无格式数据长度
                i_ret = fix_get_value(&p_inbuff, &ui_bd_len, &p_value);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                i_ret = fix_atoui(p_value, &ui_raw_data_length);
                fix_free((char **)&p_value);
                break;

            case FIX_TAG_RAWDATA:              // 无格式数据
                if (ui_raw_data_length + 1 > ui_bd_len)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }

                if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_UA001) == 0)
                {
                    i_ret = fix_fast_init_szse_ua001(&p_st_sess->st_ua001);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }

                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_ua001
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_ua001);
                    p_inbuff++;
                }
                else if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_UA004) == 0)
                {
                    i_ret = fix_fast_init_szse_ua004(&p_st_sess->st_ua004);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_ua004
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_ua004);
                    p_inbuff++;
                }
                else if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_F) == 0)
                {
                    i_ret = fix_fast_init_szse_f(&p_st_sess->st_f);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }

                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_f
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_f);
                    p_inbuff++;
                }
                else if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_B) == 0)
                {
                    i_ret = fix_fast_init_szse_B(&p_st_sess->st_B);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }

                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_B
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_B);
                    p_inbuff++;
                }
                else if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_W) == 0)
                {
                    i_ret = fix_fast_init_szse_W(&p_st_sess->st_W);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }

                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_W
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_W);
                    p_inbuff++;
                }
                else if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_UA201) == 0)
                {
                    i_ret = fix_fast_init_szse_ua201(&p_st_sess->st_ua201);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }

                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_ua201
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_ua201);
                    p_inbuff++;
                }
                else if (strcmp(p_st_fragment->p_msg_type, FIX_MSG_TP_UA202) == 0)
                {
                    i_ret = fix_fast_init_szse_ua202(&p_st_sess->st_ua202);
                    if (i_ret != FR_SUCC)
                    {
                        frlist_remove_all(&st_param, fix_param_node_free);
                        return APM_L7_ANALYZE_FAIL;
                    }
                    ui_bd_len -= ui_raw_data_length + 1;
                    while (ui_raw_data_length)
                    {
                        p_pamp = p_inbuff;
                        i_ret = fix_fast_get_pamp(&p_inbuff
                                                 , &ui_raw_data_length
                                                 , &ui_pmap_size);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }

                        ui_first = arr_deep[0] + 1;
                        memset(arr_deep, 0, sizeof(arr_deep));
                        arr_deep[0] = ui_first;
                        ui_loop = 0;
                        ui_loop_loop = 1;
                        i_ret = fix_fast_parse_raw(&p_inbuff
                                                  , &ui_raw_data_length
                                                  , &p_st_sess->st_ua202
                                                  , &st_param
                                                  , arr_deep, 0
                                                  , p_pamp, ui_pmap_size
                                                  , &ui_loop, &ui_loop_loop);
                        if (i_ret != FR_SUCC)
                        {
                            frlist_remove_all(&st_param, fix_param_node_free);
                            return APM_L7_ANALYZE_FAIL;
                        }
                    }
                    fix_fast_mod_reset(&p_st_sess->st_ua202);
                    p_inbuff++;
                }
                else
                {
                    i_ret = fix_skip_value2(&p_inbuff, &ui_bd_len, ui_raw_data_length);
                }
                break;

            case FIX_TAG_ENCODEDTEXTLEN:        // 编码文本长度
                i_ret = fix_get_value(&p_inbuff, &ui_bd_len, &p_value);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                i_ret = fix_atoui(p_value, &ui_encoded_text_length);
                fix_free((char **)&p_value);
                break;

            case FIX_TAG_ENCODEDTEXT:              // 编码文本（非ASCII 码）
                i_ret = fix_get_value2(&p_inbuff, &ui_bd_len, &p_value, ui_encoded_text_length);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                /* 创建param节点 */
                i_ret = fix_create_node(ui_tag, &p_value, ui_encoded_text_length, &st_param);
                break;

            /* 其他体部字段统一上报 */
            default:
                i_ret = fix_get_value(&p_inbuff, &ui_bd_len, &p_value);
                if (i_ret != FR_SUCC)
                {
                    frlist_remove_all(&st_param, fix_param_node_free);
                    return APM_L7_ANALYZE_FAIL;
                }
                /* 创建param节点 */
                i_ret = fix_create_node(ui_tag, &p_value, 0, &st_param);
                break;
        }

        if (i_ret != FR_SUCC)
        {
            frdbg("parse [%d] failed\n", ui_tag);
            frlist_remove_all(&st_param, fix_param_node_free);
            fix_free((char **)&p_value);
            return APM_L7_ANALYZE_FAIL;
        }
    }

    /* report */
    i_sub_ret = __fix_report_bro(p_st_conn, p_st_private, p_st_hash_report, &st_param);
    /* init param */
    frlist_remove_all(&st_param, fix_param_node_free);

    /* 查看是否还有未解析的部分 */
    if (p_st_fragment->ui_input_size > ui_fix_len)
    {
        if (p_st_fragment->i_new_flg == FR_NO)
        {
            p_input_msg = (char *)frmalloc(p_st_fragment->ui_input_size + 1);
            if (p_input_msg == NULL)
            {
                return APM_L7_ANALYZE_FAIL;
            }
            p_st_fragment->i_new_flg = FR_YES;
            p_st_fragment->ui_input_size -= ui_fix_len;
            p_st_fragment->ui_mem_size = p_st_fragment->ui_input_size + 1;
            memcpy(p_input_msg, p_st_fragment->p_input_msg + ui_fix_len
                  , p_st_fragment->ui_input_size);
            p_input_msg[p_st_fragment->ui_input_size] = '\0';
            p_st_fragment->p_input_msg = p_input_msg;
            p_st_fragment->ui_hd_len = 0;
            p_st_fragment->ui_bd_len = 0;
        }
        else
        {
            p_st_fragment->ui_hd_len = 0;
            p_st_fragment->ui_bd_len = 0;
            memmove(p_st_fragment->p_input_msg
                    , p_st_fragment->p_input_msg + ui_fix_len
                    , p_st_fragment->ui_input_size - ui_fix_len + 1);
            p_st_fragment->ui_input_size -= ui_fix_len;
        }
        fix_free((char **)&p_st_fragment->p_msg_type);
        return APM_L7_ANALYZE_TODO;
    }
    else
    {
        fix_init_fragment(p_st_private->p_st_fragment);
    }

    return i_sub_ret;
}

